package com.minelx.util.date;

import java.text.SimpleDateFormat;
import java.util.List;

import static java.util.stream.Collectors.toList;

public class DateTest {

	public static final SimpleDateFormat FORMATION = new SimpleDateFormat("yyyyMMdd");

	public static void main(String[] args) {
		System.out.println("descriptions = " + getDescriptions("20200701", "20210101"));
	}

	public static List<String> getDescriptions(String start, String end) {
		return Day.from(start).daysBetween(Day.from(end)).collect(toList())
				.stream().map(day -> day.format("yyyyMMdd"))
				.collect(toList());
	}
}
